/* single char/value transmission - vec based */
-int cet_char_to_ucs4(const char src, const cet_cs_vec_t* vec, int* value);
+int cet_char_to_ucs4(char src, const cet_cs_vec_t* vec, int* value);
short cet_utf8_to_char(const char* str, const cet_cs_vec_t* vecint, int* bytes, int* value);
-short cet_ucs4_to_char(const int value, const cet_cs_vec_t* vec);
+short cet_ucs4_to_char(int value, const cet_cs_vec_t* vec);
/* string to string - vector based */
char* cet_str_utf8_to_any(const char* src, const cet_cs_vec_t* vec);
char* cet_str_any_to_utf8(const char* src, const cet_cs_vec_t* vec);
-char* cet_str_uni_to_utf8(const short* src, const int length);
+char* cet_str_uni_to_utf8(const short* src, int length);
/* UTF-8 string manipulation functions */
unsigned int cet_utf8_strlen(const char* str);
char* cet_utf8_strdup(const char* str);
-char* cet_utf8_strndup(const char* str, const int maxlen);
+char* cet_utf8_strndup(const char* str, int maxlen);
/* unicode functions */
/* gpsbabel extensions */
-void cet_convert_init(const QString& cs_name, const int force);
+void cet_convert_init(const QString& cs_name, int force);
void cet_convert_strings(const cet_cs_vec_t* source, const cet_cs_vec_t* target, const char* format);
void cet_convert_deinit();
QString csv_stringtrim(const QString& source, const QString& enclosure);
char*
-csv_lineparse(const char* stringstart, const char* delimited_by, const char* enclosed_in, const int line_no);
+csv_lineparse(const char* stringstart, const char* delimited_by, const char* enclosed_in, int line_no);
void
human_to_dec(const char* instr, double* outlat, double* outlon, int which);
void waypt_add_url(Waypoint* wpt, const QString& link,
const QString& url_link_text,
const QString& url_link_type);
-double gcgeodist(const double lat1, const double lon1,
- const double lat2, const double lon2);
+double gcgeodist(double lat1, double lon1, double lat2, double lon2);
double waypt_time(const Waypoint* wpt);
double waypt_distance_ex(const Waypoint* A, const Waypoint* B);
double waypt_distance(const Waypoint* A, const Waypoint* B);
void setshort_whitespace_ok(short_handle, int n);
void setshort_repeating_whitespace_ok(short_handle, int n);
void setshort_defname(short_handle, const char* s);
-void setshort_is_utf8(short_handle h, const int is_utf8);
+void setshort_is_utf8(short_handle h, int is_utf8);
#define ARGTYPE_UNKNOWN 0x00000000
#define ARGTYPE_INT 0x00000001
extern style_vecs_t style_list[];
[[noreturn]] void fatal(const char*, ...) PRINTFLIKE(1, 2);
-void is_fatal(const int condition, const char*, ...) PRINTFLIKE(2, 3);
+void is_fatal(int condition, const char*, ...) PRINTFLIKE(2, 3);
void warning(const char*, ...) PRINTFLIKE(1, 2);
void debug_print(int level, const char* fmt, ...) PRINTFLIKE(2,3);
void exit_vecs();
void disp_formats(int version);
const char* name_option(long type);
-void printposn(const double c, int is_lat);
+void printposn(double c, int is_lat);
void* xcalloc(size_t nmemb, size_t size);
void* xmalloc(size_t size);
}
int str_match(const char* str, const char* match);
-QString strenquote(const QString& str, const QChar quot_char);
+QString strenquote(const QString& str, QChar quot_char);
char* strsub(const char* s, const char* search, const char* replace);
char* gstrsub(const char* s, const char* search, const char* replace);
signed int le_read32(const void* ptr);
unsigned int le_readu32(const void* ptr);
void le_read64(void* dest, const void* src);
-void be_write16(void* ptr, const unsigned value);
-void be_write32(void* ptr, const unsigned value);
-void le_write16(void* ptr, const unsigned value);
-void le_write32(void* ptr, const unsigned value);
+void be_write16(void* ptr, unsigned value);
+void be_write32(void* ptr, unsigned value);
+void le_write16(void* ptr, unsigned value);
+void le_write32(void* ptr, unsigned value);
double endian_read_double(const void* ptr, int read_le);
float endian_read_float(const void* ptr, int read_le);
/* bit manipulation functions (util.c) */
-char gb_getbit(const void* buf, const uint32_t nr);
-void gb_setbit(void* buf, const uint32_t nr);
+char gb_getbit(const void* buf, uint32_t nr);
+void gb_setbit(void* buf, uint32_t nr);
-void* gb_int2ptr(const int i);
+void* gb_int2ptr(int i);
int gb_ptr2int(const void* p);
/*
* From parse.c
*/
-int parse_coordinates(const char* str, int datum, const grid_type grid,
+int parse_coordinates(const char* str, int datum, grid_type grid,
double* latitude, double* longitude, const char* module);
-int parse_coordinates(const QString& str, int datum, const grid_type grid,
+int parse_coordinates(const QString& str, int datum, grid_type grid,
double* latitude, double* longitude, const char* module);
int parse_distance(const char* str, double* val, double scale, const char* module);
int parse_distance(const QString& str, double* val, double scale, const char* module);
-int parse_speed(const char* str, double* val, const double scale, const char* module);
-int parse_speed(const QString& str, double* val, const double scale, const char* module);
+int parse_speed(const char* str, double* val, double scale, const char* module);
+int parse_speed(const QString& str, double* val, double scale, const char* module);
/*
* From util_crc.c
} fmt_units;
int fmt_setunits(fmt_units);
-double fmt_distance(const double, const char** tag);
-double fmt_altitude(const double, const char** tag);
-double fmt_speed(const double, const char** tag);
+double fmt_distance(double, const char** tag);
+double fmt_altitude(double, const char** tag);
+double fmt_speed(double, const char** tag);
/*
* From nmea.c
*/
-int nmea_cksum(const char* const buf);
+int nmea_cksum(const char*buf);
/*
* Color helpers.
#endif
} garmin_fs_t, *garmin_fs_p;
-garmin_fs_t* garmin_fs_alloc(const int protocol);
+garmin_fs_t* garmin_fs_alloc(int protocol);
void garmin_fs_destroy(void* fs);
void garmin_fs_copy(garmin_fs_t** dest, garmin_fs_t* src);
void garmin_fs_convert(void* fs);
char* garmin_fs_xstrdup(const char* src, size_t size);
/* for GPX */
-void garmin_fs_xml_convert(const int base_tag, int tag, const QString& cdatastr, Waypoint* waypt);
+void garmin_fs_xml_convert(int base_tag, int tag, const QString& cdatastr, Waypoint* waypt);
class QXmlStreamWriter;
void garmin_fs_xml_fprint(const Waypoint* waypt, QXmlStreamWriter*);
#define GMSD_SECTION_CATEGORIES "Garmin Categories"
-void garmin_fs_garmin_after_read(const GPS_PWay way, Waypoint* wpt, const int protoid);
-void garmin_fs_garmin_before_write(const Waypoint* wpt, GPS_PWay way, const int protoid);
+void garmin_fs_garmin_after_read(GPS_PWay way, Waypoint* wpt, int protoid);
+void garmin_fs_garmin_before_write(const Waypoint* wpt, GPS_PWay way, int protoid);
#endif
}
/* gpi tag handler */
-static int read_tag(const char* caller, const int tag, Waypoint* wpt);
+static int read_tag(const char* caller, int tag, Waypoint* wpt);
/* read a single poi with all options */
typedef enum {MAPSOURCE, PCX, GARMIN_SERIAL, GDB} garmin_formats_e;
-const QString gt_find_desc_from_icon_number(const int icon, garmin_formats_e garmin_format);
+const QString gt_find_desc_from_icon_number(int icon, garmin_formats_e garmin_format);
int gt_find_icon_number_from_desc(const QString& desc, garmin_formats_e garmin_format);
extern icon_mapping_t garmin_icon_table[];
unsigned char gt_convert_category(const char* name, int* category);
-unsigned char gt_switch_display_mode_value(const unsigned char display_mode, const int protoid, const char device);
+unsigned char gt_switch_display_mode_value(unsigned char display_mode, int protoid, char device);
grid_type gt_lookup_grid_type(const char* grid_name, const QString& module);
-const char* gt_get_mps_grid_longname(const grid_type grid, const char* module);
+const char* gt_get_mps_grid_longname(grid_type grid, const char* module);
int gt_lookup_datum_index(const char* datum_str, const QString& module);
-const char* gt_get_mps_datum_name(const int datum_index);
-uint32_t gt_color_value(const unsigned int garmin_index);
+const char* gt_get_mps_datum_name(int datum_index);
+uint32_t gt_color_value(unsigned int garmin_index);
uint32_t gt_color_value_by_name(const QString& name);
int gt_color_index_by_name(const QString& name);
-int gt_color_index_by_rgb(const int rgb);
-const char* gt_color_name(const unsigned int garmin_index);
+int gt_color_index_by_rgb(int rgb);
+const char* gt_color_name(unsigned int garmin_index);
#endif
#define gbfopen_le gbfopen
void gbfclose(gbfile* file);
-gbsize_t gbfread(void* buf, const gbsize_t size, const gbsize_t members, gbfile* file);
-gbsize_t gbfread(QString& buf, const gbsize_t size, const gbsize_t members, gbfile* file);
+gbsize_t gbfread(void* buf, gbsize_t size, gbsize_t members, gbfile* file);
+gbsize_t gbfread(QString& buf, gbsize_t size, gbsize_t members, gbfile* file);
int gbfgetc(gbfile* file);
QString gbfgets(char* buf, int len, gbfile* file);
int gbfprintf(gbfile* file, const char* format, ...);
int gbfputc(int c, gbfile* file);
int gbfputs(const QString& s, gbfile* file);
-int gbfwrite(const void* buf, const gbsize_t size, const gbsize_t members, gbfile* file);
+int gbfwrite(const void* buf, gbsize_t size, gbsize_t members, gbfile* file);
int gbfflush(gbfile* file);
void gbfclearerr(gbfile* file);
int gbfseek(gbfile* file, int32_t offset, int whence);
gbsize_t gbftell(gbfile* file);
int gbfeof(gbfile* file);
-int gbfungetc(const int c, gbfile* file);
+int gbfungetc(int c, gbfile* file);
int32_t gbfgetint32(gbfile* file);
#define gbfgetuint32 (uint32_t)gbfgetint32
QString gbfgetcstr(gbfile* file); // read a null terminated string
char* gbfgetcstr_old(gbfile* file); // read a null terminated string
-int gbfputint16(const int16_t i, gbfile* file);
+int gbfputint16(int16_t i, gbfile* file);
#define gbfputuint16(a,b) gbfputint16((uint16_t)(a),(b))
-int gbfputint32(const int32_t i, gbfile* file);
+int gbfputint32(int32_t i, gbfile* file);
#define gbfputuint32(a,b) gbfputint32((uint32_t)(a),(b))
-int gbfputdbl(const double d, gbfile* file); // write a double value
-int gbfputflt(const float f, gbfile* file); // write a float value
+int gbfputdbl(double d, gbfile* file); // write a double value
+int gbfputflt(float f, gbfile* file); // write a float value
int gbfputcstr(const QString& s, gbfile* file); // write string including '\0'
static void track_disp_cb(const route_head* trk);
static void route_disp_cb(const route_head* rte);
static void write_bounds();
-static void draw_symbol_basics(const OVL_SYMBOL_TYP typ, const int art, const OVL_COLOR_TYP color, const Waypoint* wpt);
+static void draw_symbol_basics(OVL_SYMBOL_TYP typ, int art, OVL_COLOR_TYP color, const Waypoint* wpt);
static int get_direction(const Waypoint* A, const Waypoint* B);
// static void draw_symbol_text(const char *text, const waypoint *reference);
inifile_readint_def:
if found inifile_readint_def returns value of key, otherwise a default value "def"
*/
-int inifile_readint_def(const inifile_t* inifile, const char* section, const char* key, const int def);
+int inifile_readint_def(const inifile_t* inifile, const char* section, const char* key, int def);
#endif
double N, int32 zone, char zc);
int32 GPS_Math_Known_Datum_To_UTM_EN(double lat, double lon, double* E,
- double* N, int32* zone, char* zc, const int n);
+ double* N, int32* zone, char* zc, int n);
int32 GPS_Math_UTM_EN_To_Known_Datum(double* lat, double* lon, double E,
- double N, int32 zone, char zc, const int n);
+ double N, int32 zone, char zc, int n);
void GPS_Math_Swiss_LatLon_To_EN(double phi, double lambda, double* E,
double* N,double phi0,double lambda0,
void GPS_Math_Swiss_EN_To_WGS84(double E, double N, double* lat, double* lon);
void GPS_Math_UTM_EN_to_LatLon(int ReferenceEllipsoid,
- const double UTMNorthing, const double UTMEasting,
+ double UTMNorthing, double UTMEasting,
double* Lat, double* Lon,
- const double lambda0, const double E0, const double N0);
+ double lambda0, double E0, double N0);
int32 GPS_Lookup_Datum_Index(const char* n);
- const char* GPS_Math_Get_Datum_Name(const int datum_index);
+ const char* GPS_Math_Get_Datum_Name(int datum_index);
#endif
int32 GPS_Util_Little();
US GPS_Util_Get_Short(const UC* s);
- void GPS_Util_Put_Short(UC* s, const US v);
+ void GPS_Util_Put_Short(UC* s, US v);
int32 GPS_Util_Get_Int(const UC* s);
- void GPS_Util_Put_Int(UC* s, const int32 v);
+ void GPS_Util_Put_Int(UC* s, int32 v);
double GPS_Util_Get_Double(const UC* s);
- void GPS_Util_Put_Double(UC* s, const double v);
+ void GPS_Util_Put_Double(UC* s, double v);
float GPS_Util_Get_Float(const UC* s);
- void GPS_Util_Put_Float(UC* s, const float v);
+ void GPS_Util_Put_Float(UC* s, float v);
void GPS_Util_Canon(int32 state);
int32 GPS_Util_Block(int32 fd, int32 state);
- void GPS_Util_Put_Uint(UC* s, const uint32 v);
+ void GPS_Util_Put_Uint(UC* s, uint32 v);
uint32 GPS_Util_Get_Uint(const UC* s);
void GPS_Warning(const char* s);
QString mag_find_descr_from_token(const char* token);
QString mag_find_token_from_descr(const QString& icon);
-unsigned int mag_checksum(const char* const buf);
+unsigned int mag_checksum(const char*buf);
QString m330_cleanse(const char* istring);
Waypoint* mag_trkparse(char* trkmsg);
void trackfilter_minpoint_list_cb(const route_head* track);
void trackfilter_split_init_rte_name(route_head* track, const QDateTime& dt);
- void trackfilter_pack_init_rte_name(route_head* track, const time_t default_time);
+ void trackfilter_pack_init_rte_name(route_head* track, time_t default_time);
void trackfilter_title();